home *** CD-ROM | disk | FTP | other *** search
/ dub Media Cool Graphics / Dub Media - Cool Graphics.iso / democd.ss < prev    next >
Encoding:
Text File  |  1997-04-05  |  39.3 KB  |  1,220 lines

  1. #=================================================================#
  2. # Smacker Script Code for Maneuvering Through dub Media's Demo CD #
  3. # copyright 1997 dub Media Inc.                                   #
  4. #=================================================================#
  5.  
  6. ScreenWindowAutoPause 1
  7. SystemDisplayResolution 3
  8. ScreenGraphics scrn, 800, 600
  9. If scrn=0 Goto "Finisherror"
  10.  
  11. BitmapAlloc palette, 0, 0
  12. BitmapSetPaletteValue palette, 0, 0
  13. BitmapAlloc nomouse, 0, 0
  14. AnimationLoadToBitmap "cursors\sounds", soundcursor
  15. AnimationLoadToBitmap "cursors\c_about", AboutUscursor
  16. AnimationLoadToBitmap "cursors\c_sand", SBcursor
  17. AnimationLoadToBitmap "cursors\c_pie", imagecursor
  18. AnimationLoadToBitmap "cursors\c_chick", dubVRcursor
  19. AnimationLoadToBitmap "cursors\c_pizza", animcursor
  20. AnimationLoadToBitmap "cursors\c_mayo", SCARABcursor
  21. AnimationLoadToBitmap "cursors\arrow", backcursor
  22. AnimationLoadToBitmap "cursors\openfrz", openfreezer
  23. AnimationLoadToBitmap "cursors\closefrz", closefreezer
  24. AnimationLoadToBitmap "cursors\openveg", openveggies
  25. AnimationLoadToBitmap "cursors\closeveg", closeveggies
  26.  
  27. AnimationLoadToBitmap "cursors\fastleft", fastleft
  28. AnimationLoadToBitmap "cursors\fastrite", fastrite
  29. AnimationLoadToBitmap "cursors\panarrow", panarrow
  30. AnimationLoadToBitmap "cursors\panleft", panleft
  31. AnimationLoadToBitmap "cursors\panright", panright
  32.  
  33. AnimationLoadToBitmap "cursors\hand", handcursor
  34. AnimationLoadToBitmap "cursors\stills", stillcursor
  35. AnimationLoadToBitmap "cursors\panorama", pancursor
  36. AnimationLoadToBitmap "cursors\demo", democursor
  37. AnimationLoadToBitmap "cursors\slides", slideshowcursor
  38. AnimationLoadToBitmap "cursors\filmreel", filmcursor
  39.  
  40. AnimationLoadToBitmap "cursors\pageleft", pageleft
  41. AnimationLoadToBitmap "cursors\pagerite", pagerite
  42.  
  43. # get the generic names in the variable table
  44. VarSet imagelist, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  45. VarSet imagename, "12345678"
  46. VarSet imagecount, 0
  47. VarSet imagepiece, 0
  48. VarSet imageindex, 0
  49. Varset imagestep, 1
  50.  
  51. #Kitchen Sounds Variable Set
  52. VarSet sounds,      "milk    soda    jam     mayo    wcream  dressingpickle  blender cocoa   ice     tvdinnericecreamonion   tomato  carrot  "
  53. #Space Bar Still Images Variable Set
  54. VarSet thudstill,   "thud    fleeb   parker  barman  chamber minecartbarks   lilypad moth    gordo   winky   vedj    tunk    dock    zzazzl  "
  55. #Space Bar Panoramas Variable Set
  56. VarSet thudpan,     "adp     bbp     bdp     bjp     brp     ddp     dhp     kap     nhp     sdp     tbp     tcp     vap     zep     "
  57. #Images Stills Variable Set
  58. VarSet still,       "study   diner   fnlx    guitars mockup2 eandr   eand0127eandr2  eand0137eandr3  eandr1  eand0060eandr4  kitch   kiva    qlips   smokerm1smokerm2smokerm3veranda1veranda2veranda3"
  59. #Images Panoramas Variable Set
  60. VarSet piepan,      "smokerm verandah"
  61. #Scarab Still Images Variable Set
  62. VarSet scarabstill, "anubis  anushoothorus   horusgodpyramid sekhmet missionsallthreelose    "
  63. #Scarab Screen Shots Variable Set
  64. VarSet scarabshot,  "screen1 screen2 screen3 screen4 action1 action3 action4 action6 action7 action8 action9 action13action15action16action17action19action24action11"
  65. #Scarab City Shots Variable Set
  66. VarSet scarabcity,  "aswan   cairo   giza    helwan  karnak  luxor   memphis "
  67. #Animations Variable Set
  68. VarSet movies,      "sb_introsc_introanubis  sekhmet horus   entthud kitchen plane   joiner  thudjumpmuseum  admonishmarmkillrepair  sneeze  stepover"
  69. #dubVR Demos Variable Set
  70. VarSet dubdemos,    "barvr   gardenvrcutevr  titanvr droidvr thudvr  eggvr   "
  71. VarSet soundcount, 15
  72. VarSet thudpancount, 14
  73. VarSet pancount, 2
  74. VarSet moviecount, 16
  75. VarSet democount, 7
  76. VarSet SlideNum, 0
  77. VarSet ddraw, 0
  78. VarSet dsound, 0
  79.  
  80. TextTransColor 0
  81. TextBackColor 0
  82. TextColor 25
  83.  
  84. AnimationPlay scrn, -1, -1, 1, 128, "dublogo"
  85. Gosub "Keyburn"
  86.  
  87. #===============================================================#
  88. # Do the DirectX III installation thingy...                     #
  89. #===============================================================#
  90. EnvGet ddpath, "windir"
  91. FileExists ddraw,  "%ddpath%\system\ddraw.dll"
  92. FileExists dsound, "%ddpath%\system\dsound.dll"
  93. If ddraw=1 If dsound=1 Goto "ddrawOK"
  94. Gosub "Screen8x6"
  95. AnimationPlay scrn, 0, 0, 1, 0, "screens\fridge"
  96. InputMsgWin scrn, -1, -1, 12, "DirectX III is required for several of the demos.  Would you like to install it now?"
  97. If scrn=8 Goto "Welcome"
  98. InputMsgWin ddex, -1, -1, 1, "The DirectX III installation may need to reboot your machine.  If this happens, you can simply reinsert the CD afterwards to restart the demo."
  99. DirChange ddex, "DirectX"
  100. Execute ddex, "dxsetup.exe"
  101. DirChange scrn, "..\"
  102. Goto "Welcome"
  103.  
  104. :ddrawOK
  105. Gosub "Keyburn"
  106. MCISendString scrn, "close music"
  107. MCISendString scrn, "open kitchvr\A1526SM.WAV alias music"
  108. MCISendString scrn, "play music"
  109. Delay 1000
  110. SystemDisplayResolution 0
  111. DirChange ddex, "kitchvr"
  112. Execute ddex, "kitchvr.exe"
  113. DirChange ddex, "..\"
  114. Gosub "Screen8x6"
  115. MCISendString scrn, "close music"
  116. BitmapSetPalette palette
  117. AnimationPlay scrn, 0, 0, 1, 1040, "audio\dooropen"
  118. AnimationPlay scrn, 0, 0, 1, 0, "screens\fridge"
  119.  
  120. :Welcome
  121. Gosub "Keyburn"
  122. InputMsgWin scrn, -1 -1, 1, "Welcome to dub Media's demo CD!  This demo will NOT write anything on your hard drive, but it WILL change graphic modes as it runs.  Let's go... everything's inside the fridge..."
  123. SystemColors ddex
  124. If ddex < 16000 InputMsgWin scrn, -1 -1, 1, "We recommend that you exit the demo, and set your screen to 16-bit hi-color mode.  Some of the demos will look better in hi-color."
  125. Goto "FridgeWait"
  126.  
  127. #============================================================#
  128. #This RefreshFridge section takes you back to the close-up of#
  129. #the fridge with its hot spot selection areas.               #
  130. #============================================================#
  131. :RefreshFridge
  132. Gosub "Keyburn"
  133. ScreenClear 0
  134. BitmapSetPalette palette
  135. AnimationPlay audio, 0, 0, 1, 1040, "audio\dooropen"
  136. AnimationPlay scrn, 0, 0, 1, 0, "screens\fridge"
  137. :FridgeWait
  138. MouseRemoveAll
  139. MouseAdd "whole",       0,   0, 800, 600, 0
  140. MouseAdd "freezer",    86,  15, 271, 106, openfreezer
  141. MouseAdd "veggie",    252, 406,  62,  45, openveggies
  142. MouseAdd "milk",      407, 379,  72,  80, soundcursor
  143. MouseAdd "soda",      492, 424, 115, 127, soundcursor
  144. MouseAdd "jam",       421, 296,  61,  61, soundcursor
  145. MouseAdd "ketchup",   387, 166,  89, 109, AboutUscursor
  146. MouseAdd "about",     380,   0, 300, 166, AboutUscursor
  147. MouseAdd "whipcream", 491, 184,  38, 110, soundcursor
  148. MouseAdd "dressing",  536, 177,  55, 141, soundcursor
  149. MouseAdd "pickles",   598, 240,  63,  95, soundcursor
  150. MouseAdd "blender",     0, 166,  58, 144, soundcursor
  151. MouseAdd "cocoa",      29, 316,  55,  45, soundcursor
  152. MouseAdd "jello",     100, 200, 110, 154, SCARABcursor
  153. MouseAdd "sandwich",  230, 186, 114,  60, SBcursor
  154. MouseAdd "pie",       251, 328,  95,  50, imagecursor
  155. MouseAdd "chicken",   135, 355, 110,  64, dubVRcursor
  156. MouseAdd "pizza",     250, 260,  90,  60, animcursor
  157. MouseAdd "mayo",      492, 325, 117,  84, soundcursor
  158. MouseAdd "backout",   266, 500, 202, 100, backcursor
  159.  
  160. :LoopFridge
  161. Gosub "Keyburn"
  162. VarSet soundcurrent, -1
  163. InputChar key
  164. If key="whole" Goto "LoopFridge"
  165. If key="freezer" Goto "OpenFreezer"
  166. If key="veggie" Goto "OpenVeggie"
  167. If key="jello" Goto "SoundJello"
  168. If key="milk" VarSet soundcurrent, 0
  169. If key="soda" VarSet soundcurrent, 1
  170. If key="jam" VarSet soundcurrent, 2
  171. If key="mayo" VarSet soundcurrent, 3
  172. If key="whipcream" VarSet soundcurrent, 4
  173. If key="dressing" VarSet soundcurrent, 5
  174. If key="pickles" VarSet soundcurrent, 6
  175. If key="blender" VarSet soundcurrent, 7
  176. If key="cocoa" VarSet soundcurrent, 8
  177. If key="ice" VarSet soundcurrent, 9
  178. If key="tvdinner" VarSet soundcurrent, 10
  179. If key="icecream" VarSet soundcurrent, 11
  180. If key="onion" VarSet soundcurrent, 12
  181. If key="tomato" VarSet soundcurrent, 13
  182. If key="carrot" VarSet soundcurrent, 14
  183. If key="sandwich" Goto "SoundSandwich"
  184. If key="pie" Goto "SoundPie"
  185. If key="chicken" Goto "SoundChicken"
  186. If key="pizza" Goto "SoundPizza"
  187. If key="ketchup" Goto "SoundKetchup"
  188. If key="about" Goto "SoundKetchup"
  189. If key="closefreeze" Goto "CloseFreezer"
  190. If key="closeveg" Goto "CloseVeggie"
  191. If key="backout" Goto "Finish"
  192. If key="exit" Goto "Finish"
  193. If key="Alt f4" Goto "Finish"
  194. If key="ESCAPE" Goto "Finish"
  195. If soundcurrent<0 Goto "LoopFridge"
  196. DirChange scrn, "audio\"
  197. Compute soundindex, soundcurrent * 8;
  198. Compute soundindex, soundindex + 1;
  199. StrPiece sound, soundindex, 8, sounds
  200. StrTrim sound, sound
  201. AnimationPlay audio, 0, 0, 1, 1040, sound
  202. DirChange scrn, "..\"
  203. Goto "LoopFridge"
  204.  
  205. #---------------------------------------------------------------
  206. #Open Freezer Door -- will open and expose the contents inside
  207. #---------------------------------------------------------------
  208. :OpenFreezer
  209. AnimationPlay freezeopen, 52, 0, 1, 0, "frzopen"
  210. AnimationPlay audio, 0, 0, 1, 1040, "audio\open"
  211. MouseAdd "ice",           99, 103,  59,  38, soundcursor
  212. MouseAdd "tvdinner",     161,  93, 109,  48, soundcursor
  213. MouseAdd "icecream",     274,  78,  73,  62, soundcursor
  214. MouseAdd "closefreeze",   82, 150, 311,  27, closefreezer
  215. MouseRemove "freezer"
  216. Goto "LoopFridge"
  217.  
  218. #----------------------------------------------------
  219. #Close Freezer Door -- restores original fridge image
  220. #----------------------------------------------------
  221. :CloseFreezer
  222. AnimationPlay closefreeze, 52, 0, 1, 0, "frzclose"
  223. AnimationPlay audio, 0, 0, 1, 1040, "audio\close"
  224. MouseRemove "ice"
  225. MouseRemove "tvdinner"
  226. MouseRemove "icecream"
  227. MouseRemove "closefreeze"
  228. MouseAdd "freezer",    86,  15, 271, 106, openfreezer
  229. Goto "LoopFridge"
  230.  
  231. #--------------------------------------------------------------
  232. #Open Veggie Drawer -- will open and expose the contents inside
  233. #--------------------------------------------------------------
  234. :OpenVeggie
  235. AnimationPlay openveg, 152, 374, 1, 0, "veggies"
  236. AnimationPlay audio, 0, 0, 1, 1536, "audio\open"
  237. MouseAdd "onion",    193, 435,  49,  40, soundcursor
  238. MouseAdd "tomato",   262, 415,  56,  42, soundcursor
  239. MouseAdd "carrot",   325, 400,  50,  38, soundcursor
  240. MouseAdd "closeveg", 267, 465,  74,  41, closeveggies
  241. MouseRemove "veggie"
  242. Goto "LoopFridge"
  243.  
  244. #---------------------------------------------------
  245. #Close Veggie Door -- restores original fridge image
  246. #---------------------------------------------------
  247. :CloseVeggie
  248. AnimationPlay closeveg, 152, 374, 1, 0, "vegclose"
  249. AnimationPlay audio, 0, 0, 1, 1040, "audio\close"
  250. MouseRemove "onion"
  251. MouseRemove "tomato"
  252. MouseRemove "carrot"
  253. MouseAdd "veggie",    252, 406,  62,  45, openveggies 
  254. Goto "LoopFridge"
  255.  
  256. #-----------
  257. #Jello Sound
  258. #-----------
  259. :SoundJello
  260. AnimationPlay audio, 0, 0, 1, 1040, "audio\jello"
  261. Goto "Scarab"
  262.  
  263. #--------------
  264. #Sandwich Sound
  265. #--------------
  266. :SoundSandwich
  267. AnimationPlay audio, 0, 0, 1, 1040, "audio\sandwich"
  268. Goto "Spacebar"
  269.  
  270. #---------
  271. #Pie Sound
  272. #---------
  273. :SoundPie
  274. AnimationPlay audio, 0, 0, 1, 1040, "audio\pie"
  275. Goto "Images"
  276.  
  277. #-------------
  278. #Chicken Sound
  279. #-------------
  280. :SoundChicken
  281. AnimationPlay audio, 0, 0, 1, 1040, "audio\chicken"
  282. Goto "Dubvr"
  283.  
  284. #-----------
  285. #Pizza Sound
  286. #-----------
  287. :SoundPizza
  288. AnimationPlay audio, 0, 0, 1, 1040, "audio\pizza"
  289. Goto "Animation"
  290.  
  291. #-----------
  292. #Ketchup Sound
  293. #-----------
  294. :SoundKetchup
  295. #AnimationPlay audio, 0, 0, 1, 1040, "audio\ketchup"
  296. Goto "AboutUs"
  297.  
  298. #===============#
  299. #About Us Screen#
  300. #===============#
  301. :AboutUs
  302. Gosub "Keyburn"
  303. MCISendString scrn, "close music"
  304. MCISendString scrn, "open screens\A012ASM.WAV alias music"
  305. MCISendString scrn, "play music"
  306. ScreenClear 0
  307. BitmapSetPalette palette
  308. AnimationPlay scrn, 0, 0, 1, 0, "screens\aboutus"
  309. MouseRemoveAll
  310. MouseAdd "dubVR"       63,  82, 180,  37, handcursor
  311. MouseAdd "Images"      65, 122, 182,  33, handcursor
  312. MouseAdd "Scarab"      70, 160, 176,  33, handcursor
  313. MouseAdd "Animations"  69, 197, 182,  32, handcursor
  314. MouseAdd "SpaceBar"    78, 236, 170,  33, handcursor
  315. MouseAdd "kitchen"    616, 544, 155,  56, fastrite
  316.  
  317. :LoopAboutUs
  318. InputChar key
  319. If key="dubVR" Goto "DubVr"
  320. If key="Images" Goto "Images"
  321. If key="Scarab" Goto "Scarab"
  322. If key="Animations" Goto "Animation"
  323. If key="SpaceBar" Goto "SpaceBar"
  324. If key="kitchen" Goto "EscapeAboutUs"
  325. If key="ESCAPE" Goto "EscapeAboutUs"
  326. Goto "LoopAboutUs"
  327.  
  328. :EscapeAboutUs
  329. MCISendString scrn, "close music"
  330. Goto "RefreshFridge"
  331.  
  332. #=====================================#
  333. #Space Bar Images and Panoramas Screen#
  334. #=====================================#
  335. :SpaceBar
  336. Gosub "Keyburn"
  337. MCISendString scrn, "close music"
  338. MCISendString scrn, "open screens\SBAR1.WAV alias music"
  339. MCISendString scrn, "play music"
  340. Gosub "Screen8x6"
  341. AnimationPlay scrn, 0, 0, 1, 0, "screens\paksha"
  342. MouseSetXY 400, 300
  343.  
  344. :SpaceBarMouse
  345. Gosub "Keyburn"
  346. MouseRemoveAll
  347. MouseAdd "pakstill"  330,  72, 251, 195, stillcursor
  348. MouseAdd "pakpan"    190, 316, 421, 199, pancursor
  349. MouseAdd "paksha"    592, 122, 131, 225, 0
  350. MouseAdd "kitchen"     0, 540, 260,  60, fastleft
  351. MouseAdd "sbgamebox" 630, 386, 170, 214, democursor
  352.  
  353. :LoopSpaceBar
  354. InputChar key
  355. If key="pakstill" Goto "TourSpaceBarStills"
  356. If key="pakpan" Goto "SpaceBarPanoramaMenu"
  357. If key="paksha" Goto "Paksha"
  358. If key="kitchen" Goto "EscapeSpaceBar"
  359. If key="sbgamebox" Goto "SpaceBarDemoIntro"
  360. If key="ESCAPE" Goto "EscapeSpaceBar"
  361. Goto "LoopSpaceBar"
  362.  
  363. :EscapeSpaceBar
  364. MCISendString scrn, "close music"
  365. MouseRemoveAll
  366. ScreenClear 0
  367. AnimationPlay scrn, 0, 0, 1, 0, "spacebar\copyrite"
  368. AnimationPlay audio, 0, 0, 1, 1040, "audio\pkwhoa"
  369. MouseAdd "back",      0, 0, 100, 600, pageleft
  370. MouseAdd "forward", 100, 0, 700, 600, pagerite
  371. InputCharOrDelay key, 10000
  372. Goto "RefreshFridge"
  373.  
  374. #------------------------------
  375. #Space Bar Tour of Still Images
  376. #------------------------------
  377. :TourSpaceBarStills
  378. MCISendString scrn, "close music"
  379. MCISendString scrn, "open spacebar\stills\SBAR2.WAV alias music"
  380. MCISendString scrn, "play music"
  381. MouseRemoveAll
  382. MouseAdd "back",      0, 0, 100, 600, pageleft
  383. MouseAdd "forward", 100, 0, 700, 600, pagerite
  384. MouseSetXY 600, 440
  385. VarSet imagelist, thudstill
  386. VarSet imageindex, -1
  387. VarSet imagestep, 1
  388. VarSet SlideNum, 0
  389. :TSBS
  390. Gosub "ImageAdvance"
  391. ScreenClear 0
  392. DirChange scrn, "spacebar\stills\"
  393. AnimationOpen anim, 1, imagename
  394. AnimationToScreen anim, -1, -1
  395. AnimationAdvance anim
  396. AnimationClose anim
  397. DirChange scrn, "..\..\"
  398. Gosub "SlideWait"
  399. If key<>"ESCAPE" Goto "TSBS"
  400. AnimationPlay scrn, 0, 0, 1, 0, "screens\paksha"
  401. MCISendString scrn, "close music"
  402. Goto "SpaceBarMouse"
  403.  
  404. #-----------------------------------------------------------
  405. #Space Bar Panoramas Menu - select to view panoramas without
  406. #perspective correction
  407. #-----------------------------------------------------------
  408. :SpaceBarPanoramaMenu
  409. Gosub "Keyburn"
  410. MCISendString scrn, "close music"
  411. MCISendString scrn, "open spacebar\panorama\SBAR3.WAV alias music"
  412. MCISendString scrn, "play music"
  413. :SpaceBarPanoramaMenu2
  414. MouseRemoveAll
  415. MouseAdd "adp",  181, 161, 202,  28, handcursor
  416. MouseAdd "bbp",  171, 200, 220,  28, handcursor
  417. MouseAdd "bdp",  407, 161, 225,  28, handcursor
  418. MouseAdd "bjp",  414, 200, 210,  28, handcursor
  419. MouseAdd "brp",  249, 320,  66,  28, handcursor
  420. MouseAdd "ddp",  229, 360, 104,  28, handcursor
  421. MouseAdd "dhp",  175, 402, 212,  28, handcursor
  422. MouseAdd "kap",  222, 238, 122,  28, handcursor
  423. MouseAdd "nhp",  219, 277, 128,  28, handcursor
  424. MouseAdd "sdp",  461, 238, 116,  28, handcursor
  425. MouseAdd "tbp",  459, 277, 122,  28, handcursor
  426. MouseAdd "tcp",  464, 319, 112,  28, handcursor
  427. MouseAdd "vap",  479, 359,  80,  28, handcursor
  428. MouseAdd "zep",  447, 401, 146,  28, handcursor
  429. MouseAdd "kitchen"     0, 540, 260,  60, fastleft
  430. MouseAdd "done", 360, 448,  76,  24, 0
  431. AnimationPlay scrn, 0, 0, 1, 0 "screens\paksha"
  432. AnimationPlay sbpanmenu, -1, -1, 1, 0, "spacebar\sbpnmenu"
  433.  
  434. :LoopSpaceBarPanoramaMenu
  435. VarSet thudpancurrent, -1
  436. InputChar key
  437. If key="adp" VarSet thudpancurrent, 0
  438. If key="bbp" VarSet thudpancurrent, 1
  439. If key="bdp" VarSet thudpancurrent, 2
  440. If key="bjp" VarSet thudpancurrent, 3
  441. If key="brp" VarSet thudpancurrent, 4
  442. If key="ddp" VarSet thudpancurrent, 5
  443. If key="dhp" VarSet thudpancurrent, 6
  444. If key="kap" VarSet thudpancurrent, 7
  445. If key="nhp" VarSet thudpancurrent, 8
  446. If key="sdp" VarSet thudpancurrent, 9
  447. If key="tbp" VarSet thudpancurrent, 10
  448. If key="tcp" VarSet thudpancurrent, 11
  449. If key="vap" VarSet thudpancurrent, 12
  450. If key="zep" VarSet thudpancurrent, 13
  451. If key="done" Goto "DoneSBPanorama"
  452. If key="kitchen" Goto "EscapeSpaceBar"
  453. If key="ESCAPE" Goto "DoneSBPanorama"
  454. If key="ENTER" Goto "DoneSBPanorama"
  455. If thudpancurrent<0 Goto "LoopSpaceBarPanoramaMenu"
  456. DirChange scrn, "spacebar\panorama\"
  457. Compute thudpanindex, thudpancurrent * 8
  458. Compute thudpanindex, thudpanindex + 1
  459. StrPiece panname, thudpanindex, 8, thudpan
  460. StrTrim panname, panname
  461.  
  462. Gosub "PanoramaView"
  463. Goto "SpaceBarPanoramaMenu2"
  464.  
  465. #------------------------------
  466. #Space Bar Panorama Menu Closes
  467. #------------------------------
  468. :DoneSBPanorama
  469. AnimationPlay scrn, 0, 0, 1, 0, "screens\paksha"
  470. MCISendString scrn, "close music"
  471. Goto "SpaceBarMouse"
  472.  
  473. #--------------------------------------------------------------------------------------
  474. #Space Bar Intro -- plays before launching into Space Bar Demo.  Hitting "ESCAPE" skips
  475. #the intro and goes directly to the demo.
  476. #--------------------------------------------------------------------------------------
  477. :SpaceBarDemoIntro
  478. MCISendString scrn, "close music"
  479. MouseRemoveAll
  480. Gosub "Screen6x4"
  481. DirChange film, "animate\"
  482. AnimationPlay scrn, -1, -1, 1, 129, "sb_intro"
  483. DirChange film, "..\"
  484. Goto "SpaceBarDemo"
  485.  
  486. #--------------
  487. #Space Bar Demo
  488. #--------------
  489. :SpaceBarDemo
  490. MouseRemoveAll
  491. ScreenClear 0
  492. InputMsgWin scrn, -1, -1, 1, "It's time for the Space Bar MEMORY TEST!  Remember this: to exit the demo game, type <Alt> Q.  Remember: that's <Alt> Q.  Got it?"
  493. DirChange demo, "sbdemo"
  494. Execute demo, "spacebar.exe"
  495. Delay 2000
  496. DirChange scrn, "..\"
  497. Gosub "Screen8x6"
  498. #ScreenClear 0
  499. #InputMsgWin scrn, -1, -1, 1, "OK!  You passed the memory test.  How did you like the demo?"
  500. Gosub "Keyburn"
  501. AnimationPlay scrn, 0, 0, 1, 0, "spacebar\sbpix4b"
  502. InputChar key
  503. Goto "SpaceBar"
  504.  
  505. #------------
  506. #Paksha Talks
  507. #------------
  508. :Paksha
  509. AnimationPlay sounds, 0, 0, 1, 1040, "audio\paksha"
  510. Goto "LoopSpaceBar"
  511.  
  512. #=============#
  513. #Images Screen#
  514. #=============#
  515. :Images
  516. MCISendString scrn, "close music"
  517. MCISendString scrn, "open screens\A262ASM.WAV alias music"
  518. MCISendString scrn, "play music"
  519. ScreenClear 0
  520. BitmapSetPalette palette
  521. MouseSetXY 400, 300
  522.  
  523. :ImagesMouse
  524. AnimationPlay scrn, 0, 0, 1, 0, "screens\pie"
  525. MouseRemoveAll
  526. MouseAdd "piestilltext"  60, 182, 118,  31, handcursor
  527. MouseAdd "piepantext"    34, 220, 116,  28, handcursor
  528. MouseAdd "piestill"      50, 444, 207, 101, slideshowcursor
  529. MouseAdd "piepan"       352, 444, 377,  99, handcursor
  530. MouseAdd "kitchen"      570, 554, 230,  46, fastrite
  531.  
  532. :LoopImages
  533. Gosub "Keyburn"
  534. InputChar key
  535. If key="piestilltext" Goto "TourStills"
  536. If key="piepantext" Goto "PanoramaMenu"
  537. If key="piestill" Goto "TourStills"
  538. If key="piepan" Goto "PanoramaMenu"
  539. If key="kitchen" Goto "EscapeImages"
  540. If key="ESCAPE" Goto "EscapeImages"
  541. Goto "LoopImages"
  542.  
  543. :EscapeImages
  544. MCISendString scrn, "close music"
  545. Goto "RefreshFridge"
  546.  
  547. #----------------------------------------------------------
  548. #Still Images Slide Show - the still images advance through
  549. #slide show after a delay.
  550. #----------------------------------------------------------
  551. :TourStills
  552. MouseRemoveAll
  553. MouseAdd "back",      0, 0, 100, 600, pageleft
  554. MouseAdd "forward", 100, 0, 700, 600, pagerite
  555. MouseSetXY 600, 440
  556. VarSet imagelist, still
  557. VarSet imageindex, -1
  558. VarSet imagestep, 1
  559. VarSet SlideNum, 0
  560. :TS
  561. Gosub "Keyburn"
  562. Gosub "ImageAdvance"
  563. ScreenClear 0
  564. DirChange scrn, "images\stills\"
  565. AnimationOpen anim, 1, imagename
  566. AnimationToScreen anim, -1, -1
  567. AnimationAdvance anim
  568. AnimationClose anim
  569. DirChange scrn, "..\..\"
  570. Gosub "SlideWait"
  571. If key<>"ESCAPE" Goto "TS"
  572. Goto "ImagesMouse"
  573.  
  574. #--------------------------------------------------------
  575. #Images Panoramas Menu - select to view panoramas without
  576. #perspective correction
  577. #--------------------------------------------------------
  578. :PanoramaMenu
  579. AnimationPlay scrn, 0, 0, 1, 0, "screens\pie"
  580. AnimationPlay scrn, -1, -1, 1, 0, "images\panmenu"
  581. MouseRemoveAll
  582. MouseAdd "smokerm"  300, 197, 201,  38, handcursor
  583. MouseAdd "verandah" 318, 259, 166,  38, handcursor
  584. MouseAdd "kitchen"  570, 554, 230,  46, fastrite
  585. MouseAdd "done"     364, 405,  76,  26, 0
  586.  
  587. :LoopPanoramaMenu
  588. Gosub "Keyburn"
  589. VarSet pancurrent, -1
  590. InputChar key
  591. If key="smokerm" VarSet pancurrent, 0
  592. If key="verandah" VarSet pancurrent, 1
  593. If key="done" Goto "ImagesMouse"
  594. If key="kitchen" Goto "EscapeImages"
  595. If key="ESCAPE" Goto "ImagesMouse"
  596. If key="ENTER" Goto "ImagesMouse"
  597. If pancurrent<0 Goto "LoopPanoramaMenu"
  598. DirChange srcn, "images\panorama\"
  599. Compute panindex, pancurrent * 8
  600. Compute panindex, panindex + 1
  601. StrPiece panname, panindex, 8, piepan
  602. StrTrim panname, panname
  603. Gosub "PanoramaView"
  604. Goto "PanoramaMenu"
  605.  
  606. #=============#
  607. #SCARAB Screen#
  608. #=============#
  609. :Scarab
  610. MCISendString scrn, "close music"
  611. MCISendString scrn, "open screens\09.WAV alias music"
  612. MCISendString scrn, "play music"
  613. AnimationPlay scrn, 0, 0, 1, 0, "screens\dogman"
  614. MouseSetXY 350, 300
  615.  
  616. :ScarabMouse
  617. MouseRemoveAll
  618. MouseAdd "demo"       0, 150, 186, 300, democursor
  619. MouseAdd "jello"    191, 198, 171, 261, slideshowcursor
  620. MouseAdd "kitchen"  570, 554, 230,  46, fastrite
  621.  
  622. :LoopScarab
  623. Gosub "Keyburn"
  624. InputChar key
  625. If key="demo" Goto "ScarabDemoIntro"
  626. If key="jello" Goto "ScarabMenu"
  627. If key="kitchen" Goto "EscapeScarab"
  628. If key="ESCAPE" Goto "EscapeScarab"
  629. Goto "LoopScarab"
  630.  
  631. :EscapeScarab
  632. MCISendString scrn, "close music"
  633. Goto "RefreshFridge"
  634.  
  635. #--------------------------------------------------------------------------------
  636. #Scarab Intro -- plays before launching into Scarab Demo.  Hitting "ESCAPE" skips
  637. #the intro and goes directly to the demo.
  638. #--------------------------------------------------------------------------------
  639. :ScarabDemoIntro
  640. MCISendString scrn, "close music"
  641. ScreenClear 0
  642. Gosub "Screen6x4"
  643. DirChange film, "animate\"
  644. AnimationPlay scrn, -1, -1, 1, 129, "sc_intro"
  645. DirChange film, "..\"
  646. Goto "ScarabDemo"
  647.  
  648. #-----------
  649. #Scarab Demo
  650. #-----------
  651. :ScarabDemo
  652. Gosub "Keyburn"
  653. ScreenClear 0
  654. DirChange demo, "scardemo"
  655. ScreenWindowAutoPause 0
  656. SystemDisplayResolution 0
  657. If ddraw=1 Execute demo, "scarabx.exe"
  658. If ddraw=0 Execute demo, "scarab.exe"
  659. Delay 3000
  660. DirChange scrn, "..\"
  661. InputMsgWin scrn, -1 -1, 1, "Return to the main demo"
  662. Gosub "Screen8x6"
  663. ScreenWindowAutoPause 1
  664. Goto "Scarab"
  665.  
  666. #------------------------------------------------------------
  667. #Scarab Tour Menu - brings up a menu with options of choosing
  668. #the Still Images Slide Show or the Screenshots Slide Show
  669. #------------------------------------------------------------
  670. :ScarabMenu
  671. AnimationPlay scrn, 0, 0, 1, 0 "screens\dogman"
  672. AnimationPlay scrbmenu, -1, -1, 1, 0, "scarab\scrbmenu"
  673. MouseRemoveAll
  674. MouseAdd "stills"      258, 197, 282,  35, handcursor
  675. MouseAdd "screenshots" 258, 249, 282,  35, handcursor
  676. MouseAdd "cities"      258, 301, 282,  35, handcursor
  677. MouseAdd "kitchen"     570, 554, 230,  46, fastrite
  678. MouseAdd "done"        360, 405,  76,  26, 0
  679.  
  680. :LoopScarabMenu
  681. Gosub "Keyburn"
  682. InputChar key
  683. If key="stills" Goto "TourScarabStills"
  684. If key="screenshots" Goto "TourScarabScreenshots"
  685. If key="cities" Goto "TourScarabCities"
  686. If key="kitchen" Goto "EscapeScarab"
  687. If key="done" Goto "DoneScarab"
  688. If key="ESCAPE" Goto "DoneScarab"
  689. If key="ENTER" Goto "DoneScarab"
  690. Goto "LoopScarabMenu"
  691.  
  692. #------------------------
  693. #Scarab Stills Slide Show
  694. #------------------------
  695. :TourScarabStills
  696. MCISendString scrn, "close music"
  697. MCISendString scrn, "open scarab\stills\L2_3.WAV alias music"
  698. MCISendString scrn, "play music"
  699. Gosub "Screen6x4"
  700. MouseRemoveAll
  701. MouseAdd "back",      0, 0, 100, 480, pageleft
  702. MouseAdd "forward", 100, 0, 540, 480, pagerite
  703. MouseSetXY 600, 440
  704. VarSet imagelist, scarabstill
  705. VarSet imageindex, -1
  706. VarSet imagestep, 1
  707. VarSet SlideNum, 0
  708. :TSS
  709. Gosub "Keyburn"
  710. Gosub "ImageAdvance"
  711. ScreenClear 0
  712. DirChange scrn, "scarab\stills\"
  713. AnimationOpen anim, 1, imagename
  714. AnimationToScreen anim, -1, -1
  715. AnimationAdvance anim
  716. AnimationClose anim
  717. DirChange scrn, "..\..\"
  718. Gosub "SlideWait"
  719. If key<>"ESCAPE" Goto "TSS"
  720. Gosub "Screen8x6"
  721. MCISendString scrn, "close music"
  722. Goto "ScarabMenu"
  723.  
  724. #-----------------------------
  725. #Scarab Screenshots Slide Show
  726. #-----------------------------
  727. :TourScarabScreenshots
  728. MCISendString scrn, "close music"
  729. MCISendString scrn, "open scarab\screens\L3_3.WAV alias music"
  730. MCISendString scrn, "play music"
  731. Gosub "Screen6x4"
  732. MouseRemoveAll
  733. MouseAdd "back",      0, 0, 100, 480, pageleft
  734. MouseAdd "forward", 100, 0, 540, 480, pagerite
  735. MouseSetXY 600, 440
  736. VarSet imagelist, scarabshot
  737. VarSet imageindex, -1
  738. VarSet imagestep, 1
  739. VarSet SlideNum, 0
  740. :TSSS
  741. Gosub "Keyburn"
  742. Gosub "ImageAdvance"
  743. ScreenClear 0
  744. DirChange scrn, "scarab\screens\"
  745. AnimationOpen anim, 1, imagename
  746. AnimationToScreen anim, -1, -1
  747. AnimationAdvance anim
  748. AnimationClose anim
  749. DirChange scrn, "..\..\"
  750. Gosub "SlideWait"
  751. If key<>"ESCAPE" Goto "TSSS"
  752. Gosub "Screen8x6"
  753. MCISendString scrn, "close music"
  754. Goto "ScarabMenu"
  755.  
  756. #-----------------------------
  757. #Scarab Cities Slide Show
  758. #-----------------------------
  759. :TourScarabCities
  760. MCISendString scrn, "close music"
  761. MCISendString scrn, "open scarab\cities\L4_9.WAV alias music"
  762. MCISendString scrn, "play music"
  763. Gosub "Screen6x4"
  764. MouseRemoveAll
  765. MouseAdd "back",      0, 0, 100, 480, pageleft
  766. MouseAdd "forward", 100, 0, 540, 480, pagerite
  767. MouseSetXY 600, 440
  768. VarSet imagelist, scarabcity
  769. VarSet imageindex, -1
  770. VarSet imagestep, 1
  771. VarSet SlideNum, 0
  772. :TSC
  773. Gosub "Keyburn"
  774. Gosub "ImageAdvance"
  775. ScreenClear 0
  776. DirChange scrn, "scarab\cities\"
  777. AnimationOpen anim, 1, imagename
  778. AnimationToScreen anim, -1, -1
  779. AnimationAdvance anim
  780. AnimationClose anim
  781. DirChange scrn, "..\..\"
  782. Gosub "SlideWait"
  783. If key<>"ESCAPE" Goto "TSC"
  784. Gosub "Screen8x6"
  785. MCISendString scrn, "close music"
  786. Goto "ScarabMenu"
  787.  
  788. #------------------
  789. #Scarab Menu Closes
  790. #------------------
  791. :DoneScarab
  792. MouseRemoveAll
  793. AnimationPlay scrn, 0, 0, 1, 0, "screens\dogman"
  794. Goto "ScarabMouse"
  795.  
  796. #=================#
  797. #Animations Screen#
  798. #=================#
  799. :Animation
  800. MCISendString scrn, "close music"
  801. MCISendString scrn, "open screens\TOKKA2M1.WAV alias music"
  802. MCISendString scrn, "play music"
  803. ScreenClear 0
  804. BitmapSetPalette palette
  805. MouseSetXY 400, 300
  806.  
  807. :AnimationMouse
  808. AnimationPlay scrn, 0, 0, 1, 0, "screens\pizza"
  809. MouseRemoveAll
  810. MouseAdd "sbintro"       0, 380, 240,  60, filmcursor
  811. MouseAdd "scarabintro"   0, 460, 240,  60, filmcursor
  812. MouseAdd "more"          0, 528, 240,  70, handcursor
  813. MouseAdd "womanscream" 546, 182, 167, 131, soundcursor
  814. MouseAdd "laugh"       532, 356, 183,  83, soundcursor
  815. MouseAdd "scream"      616, 458, 169,  77, soundcursor
  816. MouseAdd "kitchen"     570, 554, 230,  46, fastrite
  817.  
  818. :LoopAnimation
  819. Gosub "Keyburn"
  820. VarSet moviecurrent, -1
  821. InputChar key
  822. If key="sbintro" VarSet moviecurrent, 0
  823. If key="scarabintro" VarSet moviecurrent, 1
  824. If key="more" Goto "MoreAnimations"
  825. If key="womanscream" Goto "Screaming" 
  826. If key="scream" Goto "Screaming"
  827. If key="laugh" Goto "Laughing"
  828. If key="kitchen" Goto "EscapeAnimation"
  829. If key="ESCAPE" Goto "EscapeAnimation"
  830. If moviecurrent<0 Goto "LoopAnimation"
  831. MCISendString scrn, "close music"
  832. Compute movieindex, moviecurrent * 8
  833. Compute movieindex, movieindex + 1
  834. StrPiece animate, movieindex, 8, movies
  835. StrTrim animate, animate
  836. Gosub "Screen6x4"
  837. DirChange film, "animate\"
  838. AnimationPlay scrn, -1, -1, 1, 145, animate
  839. DirChange film, "..\"
  840. Gosub "Screen8x6"
  841. Goto "AnimationMouse"
  842.  
  843. :EscapeAnimation
  844. MCISendString scrn, "close music"
  845. Goto "RefreshFridge"
  846.  
  847. #----------------------------------------------
  848. #More Animations Menu- brings up a menu list of
  849. #more animations you can choose to view
  850. #----------------------------------------------
  851. :MoreAnimations
  852. MouseRemoveAll
  853. AnimationPlay scrn, 0, 0, 1, 0 "screens\pizza"
  854. AnimationPlay moreanim, -1, -1, 1, 0, "animate\animmenu"
  855. MouseAdd "anubis"    226, 135, 108,  30, handcursor
  856. MouseAdd "sekhmet"   226, 178, 108,  30, handcursor
  857. MouseAdd "horus"     226, 221, 108,  30, handcursor
  858. MouseAdd "enterthud" 217, 262, 128,  30, handcursor
  859. MouseAdd "kitchen"   196, 303, 172,  30, handcursor
  860. MouseAdd "plane"     174, 346, 219,  30, handcursor
  861. MouseAdd "joiner"    170, 387, 225,  30, handcursor
  862. MouseAdd "thudjump"  439, 135, 160,  30, handcursor
  863. MouseAdd "museum"    442, 178, 154,  30, handcursor
  864. MouseAdd "admonish"  465, 221, 112,  30, handcursor
  865. MouseAdd "marmkill"  471, 262,  98,  30, handcursor
  866. MouseAdd "repair"    411, 303, 215,  30, handcursor
  867. MouseAdd "sneeze"    406, 346, 227,  30, handcursor
  868. MouseAdd "stepover"  437, 387, 168,  30, handcursor
  869. MouseAdd "kitchen"   570, 554, 230,  46, fastrite
  870. MouseAdd "done"      360, 472,  75,  25, 0
  871.  
  872. :LoopMoreAnimations
  873. Gosub "Keyburn"
  874. VarSet moviecurrent, -1
  875. InputChar key
  876. If key="anubis" VarSet moviecurrent, 2
  877. If key="sekhmet" VarSet moviecurrent, 3
  878. If key="horus" VarSet moviecurrent, 4
  879. If key="enterthud" VarSet moviecurrent, 5
  880. If key="kitchen" VarSet moviecurrent, 6
  881. If key="plane" VarSet moviecurrent, 7
  882. If key="joiner" VarSet moviecurrent, 8
  883. If key="thudjump" VarSet moviecurrent, 9
  884. If key="museum" VarSet moviecurrent, 10
  885. If key="admonish" VarSet moviecurrent, 11
  886. If key="marmkill" VarSet moviecurrent, 12
  887. If key="repair" VarSet moviecurrent, 13
  888. If key="sneeze" VarSet moviecurrent, 14
  889. If key="stepover" VarSet moviecurrent, 15
  890. If key="kitchen" Goto "EscapeAnimation"
  891. If key="done" Goto "DoneAnimation"
  892. If key="ESCAPE" Goto "AnimationMouse"
  893. If key="ENTER" Goto "AnimationMouse"
  894. If moviecurrent<0 Goto "LoopMoreAnimations"
  895. MCISendString scrn, "close music"
  896. Compute movieindex, moviecurrent * 8
  897. Compute movieindex, movieindex + 1
  898. StrPiece animate, movieindex, 8, movies
  899. StrTrim animate, animate
  900. Gosub "Screen6x4"
  901. DirChange film, "animate\"
  902. AnimationPlay scrn, -1, -1, 1, 145, animate
  903. DirChange film, "..\"
  904. Gosub "Screen8x6"
  905. Goto "MoreAnimations"
  906.  
  907. #------------------
  908. #More Window Closes
  909. #------------------
  910. :DoneAnimation
  911. MouseRemoveAll
  912. AnimationPlay scrn, 0, 0, 1, 0, "screens\pizza"
  913. Goto "AnimationMouse"
  914.  
  915. #--------
  916. #Laughing
  917. #--------
  918. :Laughing
  919. AnimationPlay audio, 0, 0, 1, 1040, "audio\laugh"
  920. Goto "LoopAnimation"
  921.  
  922. #---------
  923. #Screaming
  924. #---------
  925. :Screaming
  926. AnimationPlay audio, 0, 0, 1, 1040, "audio\scream"
  927. Goto "LoopAnimation"
  928.  
  929. #============#
  930. #DubVR Screen#
  931. #============#
  932. :Dubvr
  933. MCISendString scrn, "close music"
  934. MCISendString scrn, "open screens\PICKI2M1.WAV alias music"
  935. MCISendString scrn, "play music"
  936. ScreenClear 0
  937. BitmapSetPalette palette
  938. AnimationPlay scrn, 0, 0, 1, 0, "screens\chicken"
  939. MouseSetXY 400, 300
  940. If ddraw=1 Goto "DubVRMouse"
  941. InputMsgWin scrn, -1 -1, 1, "You must install DirectX III to run the dubVR demos."
  942. Goto "RefreshFridge"
  943.  
  944. :DubVRMouse
  945. MouseRemoveAll
  946. MouseAdd "demo"    168,  52, 475, 475, democursor
  947. MouseAdd "kitchen"   0, 540, 260,  60, fastleft
  948.  
  949. :LoopDubVR
  950. Gosub "Keyburn"
  951. InputChar key
  952. If key="dubvr" Goto "DubVRDemoMenu"
  953. If key="demo" Goto "DubVRDemoMenu"
  954. If key="kitchen" Goto "EscapeDubVR"
  955. If key="ESCAPE" Goto "EscapeDubVR"
  956. Goto "LoopDubVR"
  957.  
  958. :EscapeDubVR
  959. MCISendString scrn, "close music"
  960. Goto "RefreshFridge"
  961.  
  962. #------------------------------------------------------------
  963. #DubVR Demo Menu - brings up a window with a list of VR demos
  964. #to view
  965. #------------------------------------------------------------
  966. :DubVRDemoMenu
  967. AnimationPlay scrn, 0, 0, 1, 0 "screens\chicken"
  968. AnimationPlay demomenu, -1, -1, 1, 0, "dbvrmenu"
  969. MouseRemoveAll
  970. MouseAdd "bar"     170, 160, 225,  49, handcursor
  971. MouseAdd "garden"  170, 224, 225,  49, handcursor
  972. MouseAdd "queeps"  170, 286, 225,  50, handcursor
  973. MouseAdd "titanic" 170, 356, 225,  74, handcursor
  974. MouseAdd "gamble"  408, 160, 224,  49, handcursor
  975. MouseAdd "busstop" 408, 224, 224,  49, handcursor
  976. MouseAdd "eggs"    408, 286, 224,  50, handcursor
  977. MouseAdd "shivers" 408, 356, 224,  95, handcursor
  978. MouseAdd "kitchen"   0, 540, 260,  60, fastleft
  979. MouseAdd "done"    361, 468,  74,  24, 0
  980.  
  981. :LoopDubVRDemoMenu
  982. Gosub "Keyburn"
  983. VarSet democurrent, -1
  984. InputChar key
  985. If key="bar" Varset democurrent, 0
  986. If key="garden" Varset democurrent, 1
  987. If key="queeps" Varset democurrent, 2
  988. If key="titanic" Varset democurrent, 3
  989. If key="gamble" Varset democurrent, 4
  990. If key="busstop" Varset democurrent, 5
  991. If key="eggs" Varset democurrent, 6
  992. If key="shivers" Goto "Shivers2"
  993. If key="done" Goto "DoneDubVR"
  994. If key="kitchen" Goto "EscapeDubVR"
  995. If key="ESCAPE" Goto "DoneDubVR"
  996. If key="ENTER" Goto "DoneDubVR"
  997. If democurrent<0 Goto "LoopDubVRDemoMenu"
  998. MCISendString scrn, "close music"
  999. Compute demoindex, democurrent * 8
  1000. Compute demoindex, demoindex + 1
  1001. StrPiece dubdemo, demoindex, 8, dubdemos
  1002. StrTrim dubdemo, dubdemo
  1003. DirChange demoplay, "%dubdemo%"
  1004. SystemDisplayResolution 0
  1005. ScreenClear 0
  1006. Execute demoplay, "%dubdemo%.exe"
  1007. DirChange scrn, "..\"
  1008. Goto "DubVRDemoClose"
  1009.  
  1010. #------------------------------------------------------------------------------------------
  1011. #DubVR Demo Close -- prompts user that he is now being returned to the main demo and resets
  1012. #the system display resolution to 800X600.
  1013. #------------------------------------------------------------------------------------------
  1014. :DubVRDemoClose
  1015. Gosub "Screen8x6"
  1016. #InputMsgWin scrn, -1 -1, 1, "Return to the main demo"
  1017. Goto "DubVRDemoMenu"
  1018.  
  1019. #----------------------
  1020. #Close Dub VR Demo Menu
  1021. #----------------------
  1022. :DoneDubVR
  1023. AnimationPlay scrn, 0, 0, 1, 0, "screens\chicken"
  1024. Goto "DubVRMouse"
  1025.  
  1026. #----------------------
  1027. #Play the Shivers2 demo
  1028. #----------------------
  1029. :Shivers2
  1030. MouseRemoveAll
  1031. MCISendString scrn, "close music"
  1032. DirChange scrn, "s2demo"
  1033. Gosub "Screen6x4"
  1034. Execute scrn, "s2demo.exe"
  1035. ScreenClear 0
  1036. Delay 4000
  1037. InputMsgWin scrn, -1 -1, 1, "Return to the main demo"
  1038. DirChange scrn, "..\"
  1039. Gosub "Screen8x6"
  1040. Goto "DubVRDemoMenu"
  1041.  
  1042. #-----------------------------------------------------------------
  1043. #PanoramaView -- let the user scroll around a panorama, with no
  1044. #perspective correction
  1045. #-----------------------------------------------------------------
  1046. :PanoramaView
  1047. ScreenClear 0
  1048. BitmapAlloc panbmp, 2048, 512
  1049. BitmapAlloc piecebmp, 800, 512
  1050. BitmapAlloc scrnbmp, 800, 512
  1051. BitmapAlloc bigpanbmp, 2848, 512
  1052. AnimationOpen pan, 0, panname
  1053. AnimationToBitmap pan, panbmp
  1054. AnimationAdvance pan
  1055. AnimationClose pan
  1056. BitmapToBitmap piecebmp, panbmp, 1248, 0
  1057. BitmapToBitmap bigpanbmp, piecebmp, 0, 0
  1058. BitmapToBitmap bigpanbmp, panbmp, 800, 0
  1059. BitmapSetPalette panbmp
  1060. BitmapFree panbmp
  1061. BitmapFree piecebmp
  1062. VarSet panx, 800
  1063. VarSet pany, 0
  1064. MouseRemoveAll
  1065. MouseAdd "panarrow",  140,  30, 520, 510, panarrow
  1066. MouseAdd "panleft",    40,  30, 100, 510, panleft
  1067. MouseAdd "panright",  660,  30, 100, 510, panright
  1068. MouseAdd "fastleft",    0,  30,  40, 510, fastleft
  1069. MouseAdd "fastrite",  760,  30,  40, 510, fastrite
  1070. MouseAdd "done1",       0, 540, 800,  60, openfreezer
  1071. MouseAdd "done2",       0,   0, 800,  30, closefreezer
  1072. DirChange scrn, "..\..\"
  1073.  
  1074. :LoopPanorama
  1075. BitmapToBitmap scrnbmp, bigpanbmp, panx, pany
  1076. BitmapToScreen scrnbmp, 0, 44
  1077.  
  1078. :LoopPanorama2
  1079. MouseX mx
  1080. MouseY my
  1081. MouseX fx
  1082. MouseY fy
  1083. InputCharOrDelay key, 1
  1084. If key="ESCAPE" Goto "EscapePanorama"
  1085. If key="ENTER" Goto "EscapePanorama"
  1086. If key="done1" Goto "EscapePanorama"
  1087. If key="done2" Goto "EscapePanorama"
  1088. If key="RIGHT MOUSE" Goto "EscapePanorama"
  1089. If mx<=660 If mx>=140 goto "LoopPanorama2"
  1090. If mx>660 Compute panx, panx + 8
  1091. If mx<140 Compute panx, panx - 8
  1092. If fx>760 Compute panx, panx + 16
  1093. If fx<40 Compute panx, panx - 16
  1094. If panx>=2048 Compute panx, panx - 2048
  1095. If panx<0 Compute panx, panx + 2048
  1096. Goto "LoopPanorama"
  1097.  
  1098. :EscapePanorama
  1099. BitmapFree scrnbmp
  1100. BitmapFree bigpanbmp
  1101. Return
  1102.  
  1103. #============================================================#
  1104. #SlideWait - wait an initial 60 seconds, then flip every 10  #
  1105. #============================================================#
  1106. :SlideWait
  1107. If SlideNum<>0 Goto "SlideWait1"
  1108. InputCharOrDelay key, 60000
  1109. If key="DELAY" Varset SlideNum, 1
  1110. If key="DELAY" Varset imagestep, 1
  1111. Goto "SlideWaitExit"
  1112. :SlideWait1
  1113. InputCharOrDelay key, 10000
  1114. If key<>"DELAY" Varset SlideNum, 0
  1115. :SlideWaitExit
  1116. If key="LEFT" VarSet imagestep, -1
  1117. If key="PAGEUP" VarSet imagestep, -1
  1118. If key="BACKSPACE" VarSet imagestep, -1
  1119. If key="back" VarSet imagestep, -1
  1120. If key="RIGHT" VarSet imagestep, 1
  1121. If key="PAGEDOWN" VarSet imagestep, 1
  1122. If key="TAB" VarSet imagestep, 1
  1123. If key="forward" VarSet imagestep, 1
  1124. If key="RIGHT MOUSE" VarSet key, "ESCAPE"
  1125. If key="ENTER" VarSet key, "ESCAPE"
  1126. If key="SPACE" VarSet key, "ESCAPE"
  1127. Return
  1128.  
  1129. #============================================================#
  1130. #Image Advance - generic filename sequencer                  #
  1131. #============================================================#
  1132. :ImageAdvance
  1133. StrLength imagecount, imagelist
  1134. Compute imagecount, imagecount / 8
  1135. Compute imagecount, imagecount - 1
  1136. Compute imageindex, imageindex + imagestep
  1137. If imageindex > imagecount Varset imageindex, 0
  1138. If imageindex < 0 Varset imageindex, imagecount
  1139. Compute imagepiece, imageindex * 8
  1140. Compute imagepiece, imagepiece + 1
  1141. StrPiece imagename, imagepiece, 8, imagelist
  1142. StrTrim imagename, imagename
  1143. Return
  1144.  
  1145. #============================================================#
  1146. #Screen6x4  set the screen to 640x480 mode                   #
  1147. #============================================================#
  1148. :Screen6x4
  1149. ScreenClear 0
  1150. SystemDisplayResolution 2
  1151. ScreenGraphics scrn, 640, 480
  1152. If scrn=0 Goto "Finisherror"
  1153. ScreenWindowTitle ""
  1154. ScreenClear 0
  1155. MouseRemoveAll
  1156. Return
  1157.  
  1158. #============================================================#
  1159. #Screen8x6  set the screen to 800x600 mode                   #
  1160. #============================================================#
  1161. :Screen8x6
  1162. ScreenClear 0
  1163. SystemDisplayResolution 3
  1164. ScreenGraphics scrn, 800, 600
  1165. If scrn=0 Goto "Finisherror"
  1166. ScreenWindowTitle ""
  1167. ScreenClear 0
  1168. MouseRemoveAll
  1169. Return
  1170.  
  1171. #============================================================#
  1172. #Keyburn  use up any buffered keypresses                     #
  1173. #============================================================#
  1174. :Keyburn
  1175. InputCharOrDelay key, 2
  1176. If key<>"DELAY" Goto "Keyburn"
  1177. Return
  1178.  
  1179. #===========================================================#
  1180. #Finish will take you out of the dub Media Demo CD program. #
  1181. #===========================================================#
  1182. :Finisherror
  1183. InputMsgWin scrn, -1 -1, 1, "Error- could not establish a new window."
  1184. SystemColors scrn
  1185. If scrn > 65536 InputMsgWin scrn, -1 -1, 1, "Try setting Windows to 16-bit color mode, and re-start the demo."
  1186. End
  1187. :Finish
  1188. MouseRemoveAll
  1189. AnimationPlay scrn, 0, 0, 1, 0, "screens\demoexit"
  1190. InputCharOrDelay key, 10000
  1191. BitmapFree soundcursor
  1192. BitmapFree AboutUscursor
  1193. BitmapFree SBcursor
  1194. BitmapFree imagecursor
  1195. BitmapFree dubVRcursor
  1196. BitmapFree animcursor
  1197. BitmapFree SCARABcursor
  1198. BitmapFree backcursor
  1199. BitmapFree openfreezer
  1200. BitmapFree closefreezer
  1201. BitmapFree openveggies
  1202. BitmapFree closeveggies
  1203. BitmapFree fastleft
  1204. BitmapFree fastrite
  1205. BitmapFree panarrow
  1206. BitmapFree panleft
  1207. BitmapFree panright
  1208. BitmapFree handcursor
  1209. BitmapFree stillcursor
  1210. BitmapFree pancursor
  1211. BitmapFree democursor
  1212. BitmapFree slideshowcursor
  1213. BitmapFree filmcursor
  1214. BitmapFree palette
  1215. BitmapFree pageleft
  1216. BitmapFree pagerite
  1217. BitmapFree nomouse
  1218. SystemDisplayResolution 0
  1219. End
  1220.